package day5;

public class demo1 {
    public static void main(String[] args) {

        //递归
        int n = 5;
        int result = math(n);
        System.out.println(result);
    }

    public static int math(int n) {
        if (n < 2) {
            return 1;
        }
        return n * math(n - 1);
    }
}